# This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.1153.67.22 -> 1.1153.67.23 # arch/ia64/sn/io/sn2/pcibr/pcibr_error.c 1.5 -> 1.6 # arch/ia64/sn/io/sn2/pcibr/pcibr_ate.c 1.5 -> 1.6 # include/asm-ia64/sn/ioc3.h 1.3 -> (deleted) # include/asm-ia64/sn/klclock.h 1.3 -> (deleted) # arch/ia64/sn/io/sn2/pcibr/pcibr_slot.c 1.8 -> 1.9 # arch/ia64/sn/io/sn2/pic.c 1.3 -> 1.4 # arch/ia64/sn/io/sn2/pcibr/pcibr_intr.c 1.5 -> 1.6 # arch/ia64/sn/io/sn2/pcibr/pcibr_config.c 1.3 -> 1.4 # arch/ia64/sn/io/sn2/pcibr/pcibr_hints.c 1.3 -> 1.4 # arch/ia64/sn/io/sn2/pcibr/pcibr_rrb.c 1.5 -> 1.6 # arch/ia64/sn/io/sn2/pcibr/pcibr_dvr.c 1.12 -> 1.13 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 03/09/05 davidm@tiger.hpl.hp.com 1.1153.65.12 # Merge tiger.hpl.hp.com:/data1/bk/lia64/to-linus-2.5 # into tiger.hpl.hp.com:/data1/bk/lia64/linux-ia64-2.5 # -------------------------------------------- # 03/09/06 wim@iguana.be 1.1179.1.1 # [WATCHDOG] Documentation # # move all watchdog documentation into Documentation/watchdog/ # -------------------------------------------- # 03/09/06 rmk@flint.arm.linux.org.uk 1.1179.2.1 # [PCMCIA] Fix cs.c debugging. # # socket references are pointers, not integers. # -------------------------------------------- # 03/09/06 rmk@flint.arm.linux.org.uk 1.1179.2.2 # [PCMCIA] Use "yenta" instead of pci_name() when allocating irq. # -------------------------------------------- # 03/09/06 rmk@flint.arm.linux.org.uk 1.1179.2.3 # [PCMCIA] Fix race condition causing cards to be incorrectly recognised # # This patch fixes a race condition between the pcmcia socket initial # insert processing, ds.c and cardmgr. This allowed cardmgr to believe # that a card was inserted while the card is still in the process of # resetting itself, and it therefore tried to read the CIS while it # was unavailable. # # We change the meaning of SOCKET_PRESENT slightly - it now means that # a card is present _and we have completed its initialisation_. We # introduce SOCKET_INUSE to indicate that we have a reference count # against the module. # # We also take the skt_sem to prevent clients from registering while # we're handling an insert/remove/suspend/resume. # -------------------------------------------- # 03/09/06 sam@mars.ravnborg.org 1.1179.3.1 # kbuild: Do not duplicate A/CFLAGS # # This solves 1193 in bugme as reported by ak@suse.de # AFLAGS and CFLAGS contained duplicate entries, both generic and # architecture specific flags # -------------------------------------------- # 03/09/06 sam@mars.ravnborg.org 1.1179.3.2 # kbuild: arch/i386/boot*, use kbuild syntax when descending into compressed # # Use proper kbuild syntax when descending into compressed. # The use of $(Q)$(MAKE) $(build)=... is the preferred method # -------------------------------------------- # 03/09/06 sam@mars.ravnborg.org 1.1179.3.3 # kbuild/ieee1394: Makefile update # # Use full path to script in oui.c build rule. # Take advantage of kbuild checking command-line arguments, # by adding FORCE as prerequisite, and by use of targets= # -------------------------------------------- # 03/09/06 sam@mars.ravnborg.org 1.1179.3.4 # kbuild/isdn: Defer md5sum calculation until needed # # Replacing ':=' assignment with '=' assignment defers md5sum calculation until # required. The pevious implementation actually calculated the md5sum during # a make clean # -------------------------------------------- # 03/09/06 sam@mars.ravnborg.org 1.1179.3.5 # kbuild/eisa: Makefile update # # - Nice output when generating devlist.h # - Defer DEVICE_NAME_SIZE assignment until needed # No funtional changes # -------------------------------------------- # 03/09/06 sam@mars.ravnborg.org 1.1179.3.6 # kbuild: genksyms, add explicit reference to include dir # # genksyms references .h files in the genksyms directory from a # generated .c file. Explicit tell kbuild to search the genksyms # directory in the kernel src tree for .h files. # -------------------------------------------- # 03/09/06 B.Zolnierkiewicz@elka.pw.edu.pl 1.1179.2.4 # [PATCH] ide: fix imbalance preempt count with taskfile PIO # # Noticed by Tejun Huh . # -------------------------------------------- # 03/09/06 hugh@veritas.com 1.1179.2.5 # [PATCH] Fix futex hashing bugs # # This fixes two buts that the glibc NPTL verification tests found, one # new and one old. # # The new bug is that "offset" has been declared as an alternative in # the union, instead of as an element in the structures comprising it, # effectively eliminating it from the key: keys match which should not. # # The old bug is that if futex_requeue were called with identical # key1 and key2 (sensible? tended to happen given the first bug), # it was liable to loop for a long time holding futex_lock: guard # against that, still respecting the semantics of futex_requeue. # # While here, please let's also fix the get_futex_key VM_NONLINEAR # case, which was returning the 1 from get_user_pages, taken as an # error by its callers. And save a few bytes and improve debuggability # by uninlining the top-level futex_wake, futex_requeue, futex_wait. # -------------------------------------------- # 03/09/06 torvalds@home.osdl.org 1.1179.2.6 # Merge bk://kernel.bkbits.net/gregkh/linux/linus-2.6 # into home.osdl.org:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/09/06 torvalds@home.osdl.org 1.1187 # Merge bk://kernel.bkbits.net/jgarzik/irda-2.5 # into home.osdl.org:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/09/06 torvalds@home.osdl.org 1.1188 # Merge http://linux-watchdog.bkbits.net/linux-2.5-watchdog # into home.osdl.org:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/09/06 rusty@rustcorp.com.au 1.1189 # [PATCH] Futex-fd error return fix # # Hugh Dickins caught this confusion between the ret variable in outer # scope (holding the fd) and the return value of f_setown. Rename inner # "ret". # -------------------------------------------- # 03/09/06 geert@linux-m68k.org 1.1190 # [PATCH] dmasound core fixes # # Dmasound core fixes from Christoph Hellwig: # - Some exported symbols are declared __init - in the modular case this is # freed before the other modules can call it.. # - dmasound.lock is initialized too late, do it at compile time # -------------------------------------------- # 03/09/06 geert@linux-m68k.org 1.1191 # [PATCH] dmasound kill MOD_{IN,DE}C_USE_COUNT # # Dmasound: Use try_module_get()/module_put() instead of methods calling # MOD_{IN,DE}C_USE_COUNT (from Christoph Hellwig) # -------------------------------------------- # 03/09/06 rddunlap@osdl.org 1.1192 # [PATCH] janitor: remove unneeded version.h #includes # # From: Randy Hron # # remove unneeded linux/version.h usage & some duplicate # #includes; # -------------------------------------------- # 03/09/06 rddunlap@osdl.org 1.1193 # [PATCH] janitor: add static to comx # # From: Daniele Bellucci # # add 'static' to a function # -------------------------------------------- # 03/09/06 rddunlap@osdl.org 1.1194 # [PATCH] janitor: sc520_wdt # # Insert ioremap error check and adjust cleanup path accordingly. # # From: Leann Ogasawara # -------------------------------------------- # 03/09/06 rddunlap@osdl.org 1.1195 # [PATCH] janitor: oss/ali copy*user fixes # # From: Daniele Bellucci # -------------------------------------------- # 03/09/06 rddunlap@osdl.org 1.1196 # [PATCH] janitor: oss/ite8172 copy*user fixes # # This patch catches insures proper return values from # copy_to/from_user calls. # # From: Ron Gage # -------------------------------------------- # 03/09/06 rddunlap@osdl.org 1.1197 # [PATCH] janitor: skfddi copy*user fixes # # From: Daniele Bellucci # # This patch audits some copy_from/to_user in the SysKonnect FDDI device # driver. # -------------------------------------------- # 03/09/06 rddunlap@osdl.org 1.1198 # [PATCH] janitor: remove __SMP__ # # Three small 1-line patches to get rid of any remaining __SMP__ # references in the 2.6 kernel. # # From: Ron Gage # -------------------------------------------- # 03/09/06 rddunlap@osdl.org 1.1199 # [PATCH] janitor: jffs2 add/delete version.h # # From: Randy Hron # -------------------------------------------- # 03/09/06 rddunlap@osdl.org 1.1200 # [PATCH] janitor: adfs: add/remove version.h # # From: Randy Hron # # Put version.h in the file that needs it. # Remove version.h where it isn't needed. # Tested as module/non-module on x86. # -------------------------------------------- # 03/09/06 rddunlap@osdl.org 1.1201 # [PATCH] janitor: fix oss/harmony copy*user # # This patch catches insures proper return values from # copy_to/from_user calls. # # From: Ron Gage # -------------------------------------------- # 03/09/06 rddunlap@osdl.org 1.1202 # [PATCH] janitor: cdrom module owner # # From: Daniele # # OK-ed by Jens. # -------------------------------------------- # 03/09/06 rddunlap@osdl.org 1.1203 # [PATCH] janitor: fix input serport register failure # # From: Daniele Bellucci # -------------------------------------------- # 03/09/06 rddunlap@osdl.org 1.1204 # [PATCH] janitor: fix blk_init_queue() comments # # blk_init_queue() has changed (it now returns queue), but the # comments were the same. # # Also fixed a comment in blk_queue_end_tag. # # From: Domen Puncer # -------------------------------------------- # 03/09/06 rddunlap@osdl.org 1.1205 # [PATCH] janitor: fix oss/swarm copy*user # # This patch catches insures proper return values from # copy_to/from_user calls. # # From: Ron Gage # -------------------------------------------- # 03/09/06 rddunlap@osdl.org 1.1206 # [PATCH] janitor: saa7134 pci alloc/free consistent checking # # From: Leann Ogasawara # # Patch to insert ioremap() error checking and missing iounmap()'s. Also # updated error handling to have only one return statement on error. # Finally, in saa7134_finidev() on line 954 there was a duplicate # saa7134_i2c_unregister(). # -------------------------------------------- # 03/09/06 rddunlap@osdl.org 1.1207 # [PATCH] janitor: coda delete version.h # # Test compiled on x86. # # From: Randy Hron # -------------------------------------------- # 03/09/06 rddunlap@osdl.org 1.1209 # [PATCH] janitor: fix copy*user in tc/zs # # This patch catches insures proper return values from # copy_to/from_user calls. # # From: Ron Gage # -------------------------------------------- # 03/09/06 rddunlap@osdl.org 1.1210 # [PATCH] janitor: more init/exit cleanups # # From: Domen Puncer # and Randy Dunlap # # Release (in fact all) functions shouldn't be __init or __exit, if they # are called from __init and __exit functions. # -------------------------------------------- # 03/09/06 rddunlap@osdl.org 1.1211 # [PATCH] janitor: oss/forte copy*user fixes # # This patch catches insures proper return values from # copy_to/from_user calls. # # From: Ron Gage # -------------------------------------------- # 03/09/06 rddunlap@osdl.org 1.1212 # [PATCH] janitor: paride: better return codes # # From: Domen Puncer # -------------------------------------------- # 03/09/06 rddunlap@osdl.org 1.1213 # [PATCH] janitor: qla1280 pci alloc/free consistent checking # # Ports previous qla1280.c patch to 2.6.0-test2. Fixes incorrect if # statement. Inserts pci_free_consistent on error. # # From: Leann Ogasawara # -------------------------------------------- # 03/09/06 rddunlap@osdl.org 1.1214 # [PATCH] janitor: x86_64/sys_ia32 # # This patch catches insures proper return values from # copy_to/from_user calls. # # From: Ron Gage # -------------------------------------------- # 03/09/06 rddunlap@osdl.org 1.1215 # [PATCH] rename make check* targets, add versioncheck # # rename make check* targets to make *check (per Sam) since 'make # checkconfig' currently doesn't work; add versioncheck and # scripts/checkversion.pl; # -------------------------------------------- # 03/09/06 rddunlap@osdl.org 1.1216 # [PATCH] jffs2: add linux/version.h as needed # # include linux/version.h in files that use its defines; # -------------------------------------------- # 03/09/06 Andries.Brouwer@cwi.nl 1.1217 # [PATCH] more keyboard stuff # # I looked a bit more at the keyboard code and find a bug # and a probable bug. # # (i) In case a synaptics touchpad has been detected, the comment says # "disable AUX". But we do not set the disable bit, but instead .and. # with the bit - no doubt getting zero. This must be a bug. # # (ii) Directly above this is the suspicious comment "keyboard translation # seems to be always off". But every machine comes always up in # translated scancode 2. Translation is never off. But wait! by # mistake the above .and. cleared the XLATE bit. # # So, I think bug (i) explains mystery (ii). # # However, note that this is code reading only. I do not have the # hardware, so cannot test. # -------------------------------------------- # 03/09/07 willy@debian.org 1.1218 # [PATCH] use size_t for the broken ioctl numbers # # The ioctl number-generating macros should be used like # # #define XXXX _IOR(n,x,type-of-arg) # # which generates an ioctl number that has the size of the argument # encoded within it. But there are a number of ioctl #defines that look # like # # #define XXXX _IOR(n,x,sizeof(type-of-arg)) # # which is very wrong: the _IO/_IOR/_IOW/_IOWR macros will do the sizeof() # on the argtype themselves, so the end result is that we will be doing a # sizeof(sizeof(argtype)), ie a sizeof(size_t). # # In other words, the argtype didn't matter at all, and ended up totally # pointless. # # Clearly it's too late to change the ioctl definitions, but we can at # least stop people from copying them and making the same mistake. # -------------------------------------------- # 03/09/07 torvalds@home.osdl.org 1.1219 # Fix PCMCIA typo (extra 'R') that broke the compile. # -------------------------------------------- # 03/09/07 torvalds@home.osdl.org 1.1220 # Fix over-eager ioctl number fix. _IOC() does want the sizeof(). # -------------------------------------------- # 03/09/07 torvalds@home.osdl.org 1.1221 # Undo static on ide_probe_for_pdc4030: it can (and will) be called # from the IDE init code when compiled-in. # -------------------------------------------- # 03/09/07 torvalds@home.osdl.org 1.1222 # Merge bk://linux-sam.bkbits.net/kbuild # into home.osdl.org:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/09/07 torvalds@home.osdl.org 1.1223 # Mark drivers that can't be built stand-alone in the configuration # files. # -------------------------------------------- # 03/09/07 kkeil@suse.de 1.1224 # [PATCH] next fixes # # here are the next fixes, sorry for the delay, but one of bugs was a really # odd one. # # Note: # - here are lot of bugs left, so ISDN is not stable yet but # I think it's really time to fix it, even if it need some cycles # to get it right (normally I'm only send patches if it works 100% for # me). # - I add some additional #warnings to address places which need fixing # (I hope that some of the other ISDN developer jump in) # -------------------------------------------- # 03/09/07 rmk@arm.linux.org.uk 1.1225 # [PATCH] Fixes to allow ARM to build in the standard tree # # In addition to the MODULE_ALIAS_LDISC patch, the following changes to # generic code are needed to allow ARM to build in Linus' tree. # # The first is to add PT_SINGLESTEP to ptrace.h so we do the right thing # when adding/removing breakpoint instructions into processes (see # arch/arm/kernel/{signal.c,ptrace.c} for usage.) # # The second is needed because pmd_clear() needs to flush the pmd. # However, we can't include tlbflush.h into pgtable.h without causing # a circular dependency (tlbflush.h needs vm_area_struct and mm_struct # which are in mm.h, which needs pgtable.h.) swapfile.c seems to be the # only file affected. # -------------------------------------------- # 03/09/07 torvalds@home.osdl.org 1.1226 # Fix various scripts to be marked executable. # # From carbonated beverage . # # [ "carbonated beverage"? WTF? I think I need a cool handle too ;] # -------------------------------------------- # 03/09/07 spyro@f2s.com 1.1227 # [PATCH] arm26 updates # # Not much to write home about. mostly tidying, some debug, and XIP support. # # just keeping arm26 up to date really. # -------------------------------------------- # 03/09/07 ak@muc.de 1.1228 # [PATCH] x86-64 update # # Nothing too exciting, just some minor new features and bug fixes. # The IOMMU code should now not BUG again without CONFIG_IOMMU_DEBUG/iommu=force # # - Compiles now with -funit-at-a-time # - Fix up ioctl 32bit tables following Andrew's change. # - Fix __SI_POLL siginfo_t passing to user space # - Add 32bit emulation for fadvise64_64 # - Remove unneeded sys32_utimes # - Various merges with i386 (ACPI, APIC etc.) # - Port cpuid patching infrastructure from i386 # - Use it to provide better copy_*_user/memcpy/memset/clear/copy_page for # C stepping K8. String instructions are faster now that unrolled loops. # - Don't try to merge unforced PCI mappings that don't exceed the device's # DMA mask. # - Discard .exit.data/.exit.text at runtime like i386 # - Don't use NTI stores for clear_user # - Convert bitops.h bitmap functions to use unsigned long * pointers instead # of void * # - Fix some warnings in kernel headers. # - Fix PDA comments # -------------------------------------------- # 03/09/07 willy@debian.org 1.1229 # [PATCH] CONFIG_64BIT # # This adds CONFIG_64BIT to allow us to disable non-64-bit safe drivers on # 64-bit platforms and converts the I2O driver to use it. # -------------------------------------------- # 03/09/07 rusty@rustcorp.com.au 1.1230 # [PATCH] Modules: Be stricter recognizing init&exit sesections # # Someone pointed out that -ffunction-sections can cause a function called # "init" to be put in the init section, and discarded. This # hurts PARISC badly. Get more fussy with identifying them. # -------------------------------------------- # 03/09/07 rusty@rustcorp.com.au 1.1231 # [PATCH] modprobe -q: quieter when modules missing # # The kernel invokes "modprobe" on modules which might not exist: # rightfully, modprobe complains by default when this happens. So the # correct response is to invoke "modprobe -q", which is silent on such # errors (but still reports other errors such as config errors). # # Also, use MODULE_NAME_LEN from module.h instead of inventing our own. # -------------------------------------------- # 03/09/07 torvalds@home.osdl.org 1.1232 # Fix more ioctl _IOR/_IOW misusage. # -------------------------------------------- # 03/09/08 arnd@arndb.de 1.1233 # [PATCH] Verify proper usage of ioctl macros # # This new version works with all compiler versions, and also catches the # case where somebody tries to pass in an array as an argument to the # ioctl macros. Thus we verify that only proper types are used. # # I have checked now that the object code for arch/s390/kernel/compat_ioctl.o # remains identical and that the whole kernel compiles for s390 and i386, # after fixing the broken ioctl numbers. # -------------------------------------------- # 03/09/08 torvalds@home.osdl.org 1.1234 # Arnd's new-and-improved _IOx() argument checking showed two sound # drivers whose microcode load ioctl's used types with sizes that # overflow the ioctl number. Mark them _IOx_BAD() to document the fact. # -------------------------------------------- # 03/09/08 shemminger@osdl.org 1.1235 # [PATCH] sdla non-module build fix. # # Last round of changes broke sdla build if not a module. # -------------------------------------------- # 03/09/08 axboe@suse.de 1.1236 # [PATCH] Fix noop elevator request merging # # From: Oleg Drokin # # Without this, if elv_try_last_merge() returns nonzero, we do not # initialise *req. That results in a subsequent BUG_ON() in # __make_request() because req is NULL (or is just uninitialised). # -------------------------------------------- # 03/09/08 jes@wildopensource.com 1.1153.67.23 # [PATCH] ia64: remove unused sn2 header files # # This patch eliminates two unused SN2 header files: # include/asm-ia64/sn/klclock.h and include/asm-ia64/sn/ioc3.h. # -------------------------------------------- # diff -Nru a/arch/ia64/sn/io/sn2/pcibr/pcibr_ate.c b/arch/ia64/sn/io/sn2/pcibr/pcibr_ate.c --- a/arch/ia64/sn/io/sn2/pcibr/pcibr_ate.c Tue Sep 9 01:05:36 2003 +++ b/arch/ia64/sn/io/sn2/pcibr/pcibr_ate.c Tue Sep 9 01:05:36 2003 @@ -26,7 +26,6 @@ #include #include #include -#include #include #include diff -Nru a/arch/ia64/sn/io/sn2/pcibr/pcibr_config.c b/arch/ia64/sn/io/sn2/pcibr/pcibr_config.c --- a/arch/ia64/sn/io/sn2/pcibr/pcibr_config.c Tue Sep 9 01:05:36 2003 +++ b/arch/ia64/sn/io/sn2/pcibr/pcibr_config.c Tue Sep 9 01:05:36 2003 @@ -27,7 +27,6 @@ #include #include #include -#include #include #include diff -Nru a/arch/ia64/sn/io/sn2/pcibr/pcibr_dvr.c b/arch/ia64/sn/io/sn2/pcibr/pcibr_dvr.c --- a/arch/ia64/sn/io/sn2/pcibr/pcibr_dvr.c Tue Sep 9 01:05:36 2003 +++ b/arch/ia64/sn/io/sn2/pcibr/pcibr_dvr.c Tue Sep 9 01:05:36 2003 @@ -31,7 +31,6 @@ #include #include #include -#include #include #include diff -Nru a/arch/ia64/sn/io/sn2/pcibr/pcibr_error.c b/arch/ia64/sn/io/sn2/pcibr/pcibr_error.c --- a/arch/ia64/sn/io/sn2/pcibr/pcibr_error.c Tue Sep 9 01:05:36 2003 +++ b/arch/ia64/sn/io/sn2/pcibr/pcibr_error.c Tue Sep 9 01:05:36 2003 @@ -26,7 +26,6 @@ #include #include #include -#include #include #include diff -Nru a/arch/ia64/sn/io/sn2/pcibr/pcibr_hints.c b/arch/ia64/sn/io/sn2/pcibr/pcibr_hints.c --- a/arch/ia64/sn/io/sn2/pcibr/pcibr_hints.c Tue Sep 9 01:05:36 2003 +++ b/arch/ia64/sn/io/sn2/pcibr/pcibr_hints.c Tue Sep 9 01:05:36 2003 @@ -26,7 +26,6 @@ #include #include #include -#include #include #include diff -Nru a/arch/ia64/sn/io/sn2/pcibr/pcibr_intr.c b/arch/ia64/sn/io/sn2/pcibr/pcibr_intr.c --- a/arch/ia64/sn/io/sn2/pcibr/pcibr_intr.c Tue Sep 9 01:05:36 2003 +++ b/arch/ia64/sn/io/sn2/pcibr/pcibr_intr.c Tue Sep 9 01:05:36 2003 @@ -26,7 +26,6 @@ #include #include #include -#include #include #include diff -Nru a/arch/ia64/sn/io/sn2/pcibr/pcibr_rrb.c b/arch/ia64/sn/io/sn2/pcibr/pcibr_rrb.c --- a/arch/ia64/sn/io/sn2/pcibr/pcibr_rrb.c Tue Sep 9 01:05:36 2003 +++ b/arch/ia64/sn/io/sn2/pcibr/pcibr_rrb.c Tue Sep 9 01:05:36 2003 @@ -26,7 +26,6 @@ #include #include #include -#include #include #include diff -Nru a/arch/ia64/sn/io/sn2/pcibr/pcibr_slot.c b/arch/ia64/sn/io/sn2/pcibr/pcibr_slot.c --- a/arch/ia64/sn/io/sn2/pcibr/pcibr_slot.c Tue Sep 9 01:05:36 2003 +++ b/arch/ia64/sn/io/sn2/pcibr/pcibr_slot.c Tue Sep 9 01:05:36 2003 @@ -27,7 +27,6 @@ #include #include #include -#include #include #include diff -Nru a/arch/ia64/sn/io/sn2/pic.c b/arch/ia64/sn/io/sn2/pic.c --- a/arch/ia64/sn/io/sn2/pic.c Tue Sep 9 01:05:36 2003 +++ b/arch/ia64/sn/io/sn2/pic.c Tue Sep 9 01:05:36 2003 @@ -26,7 +26,6 @@ #include #include #include -#include #include #include diff -Nru a/include/asm-ia64/sn/ioc3.h b/include/asm-ia64/sn/ioc3.h --- a/include/asm-ia64/sn/ioc3.h Tue Sep 9 01:05:36 2003 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,705 +0,0 @@ -/* - * Copyright (c) 2002-2003 Silicon Graphics, Inc. All Rights Reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/NoticeExplan - */ - -/* $Id: ioc3.h,v 1.2 2000/11/16 19:49:17 pfg Exp $ - * - * Copyright (C) 1999 Ralf Baechle - * This file is part of the Linux driver for the SGI IOC3. - */ -#ifndef _ASM_IA64_SN_IOC3_H -#define _ASM_IA64_SN_IOC3_H - -#include - -/* SUPERIO uart register map */ -typedef volatile struct ioc3_uartregs { - union { - volatile u8 rbr; /* read only, DLAB == 0 */ - volatile u8 thr; /* write only, DLAB == 0 */ - volatile u8 dll; /* DLAB == 1 */ - } u1; - union { - volatile u8 ier; /* DLAB == 0 */ - volatile u8 dlm; /* DLAB == 1 */ - } u2; - union { - volatile u8 iir; /* read only */ - volatile u8 fcr; /* write only */ - } u3; - volatile u8 iu_lcr; - volatile u8 iu_mcr; - volatile u8 iu_lsr; - volatile u8 iu_msr; - volatile u8 iu_scr; -} ioc3_uregs_t; - -#define iu_rbr u1.rbr -#define iu_thr u1.thr -#define iu_dll u1.dll -#define iu_ier u2.ier -#define iu_dlm u2.dlm -#define iu_iir u3.iir -#define iu_fcr u3.fcr - -struct ioc3_sioregs { - volatile u8 fill[0x141]; /* starts at 0x141 */ - - volatile u8 uartc; - volatile u8 kbdcg; - - volatile u8 fill0[0x150 - 0x142 - 1]; - - volatile u8 pp_data; - volatile u8 pp_dsr; - volatile u8 pp_dcr; - - volatile u8 fill1[0x158 - 0x152 - 1]; - - volatile u8 pp_fifa; - volatile u8 pp_cfgb; - volatile u8 pp_ecr; - - volatile u8 fill2[0x168 - 0x15a - 1]; - - volatile u8 rtcad; - volatile u8 rtcdat; - - volatile u8 fill3[0x170 - 0x169 - 1]; - - struct ioc3_uartregs uartb; /* 0x20170 */ - struct ioc3_uartregs uarta; /* 0x20178 */ -}; - -/* Register layout of IOC3 in configuration space. */ -struct ioc3 { - volatile u32 pad0[7]; /* 0x00000 */ - volatile u32 sio_ir; /* 0x0001c */ - volatile u32 sio_ies; /* 0x00020 */ - volatile u32 sio_iec; /* 0x00024 */ - volatile u32 sio_cr; /* 0x00028 */ - volatile u32 int_out; /* 0x0002c */ - volatile u32 mcr; /* 0x00030 */ - - /* General Purpose I/O registers */ - volatile u32 gpcr_s; /* 0x00034 */ - volatile u32 gpcr_c; /* 0x00038 */ - volatile u32 gpdr; /* 0x0003c */ - volatile u32 gppr_0; /* 0x00040 */ - volatile u32 gppr_1; /* 0x00044 */ - volatile u32 gppr_2; /* 0x00048 */ - volatile u32 gppr_3; /* 0x0004c */ - volatile u32 gppr_4; /* 0x00050 */ - volatile u32 gppr_5; /* 0x00054 */ - volatile u32 gppr_6; /* 0x00058 */ - volatile u32 gppr_7; /* 0x0005c */ - volatile u32 gppr_8; /* 0x00060 */ - volatile u32 gppr_9; /* 0x00064 */ - volatile u32 gppr_10; /* 0x00068 */ - volatile u32 gppr_11; /* 0x0006c */ - volatile u32 gppr_12; /* 0x00070 */ - volatile u32 gppr_13; /* 0x00074 */ - volatile u32 gppr_14; /* 0x00078 */ - volatile u32 gppr_15; /* 0x0007c */ - - /* Parallel Port Registers */ - volatile u32 ppbr_h_a; /* 0x00080 */ - volatile u32 ppbr_l_a; /* 0x00084 */ - volatile u32 ppcr_a; /* 0x00088 */ - volatile u32 ppcr; /* 0x0008c */ - volatile u32 ppbr_h_b; /* 0x00090 */ - volatile u32 ppbr_l_b; /* 0x00094 */ - volatile u32 ppcr_b; /* 0x00098 */ - - /* Keyboard and Mouse Registers */ - volatile u32 km_csr; /* 0x0009c */ - volatile u32 k_rd; /* 0x000a0 */ - volatile u32 m_rd; /* 0x000a4 */ - volatile u32 k_wd; /* 0x000a8 */ - volatile u32 m_wd; /* 0x000ac */ - - /* Serial Port Registers */ - volatile u32 sbbr_h; /* 0x000b0 */ - volatile u32 sbbr_l; /* 0x000b4 */ - volatile u32 sscr_a; /* 0x000b8 */ - volatile u32 stpir_a; /* 0x000bc */ - volatile u32 stcir_a; /* 0x000c0 */ - volatile u32 srpir_a; /* 0x000c4 */ - volatile u32 srcir_a; /* 0x000c8 */ - volatile u32 srtr_a; /* 0x000cc */ - volatile u32 shadow_a; /* 0x000d0 */ - volatile u32 sscr_b; /* 0x000d4 */ - volatile u32 stpir_b; /* 0x000d8 */ - volatile u32 stcir_b; /* 0x000dc */ - volatile u32 srpir_b; /* 0x000e0 */ - volatile u32 srcir_b; /* 0x000e4 */ - volatile u32 srtr_b; /* 0x000e8 */ - volatile u32 shadow_b; /* 0x000ec */ - - /* Ethernet Registers */ - volatile u32 emcr; /* 0x000f0 */ - volatile u32 eisr; /* 0x000f4 */ - volatile u32 eier; /* 0x000f8 */ - volatile u32 ercsr; /* 0x000fc */ - volatile u32 erbr_h; /* 0x00100 */ - volatile u32 erbr_l; /* 0x00104 */ - volatile u32 erbar; /* 0x00108 */ - volatile u32 ercir; /* 0x0010c */ - volatile u32 erpir; /* 0x00110 */ - volatile u32 ertr; /* 0x00114 */ - volatile u32 etcsr; /* 0x00118 */ - volatile u32 ersr; /* 0x0011c */ - volatile u32 etcdc; /* 0x00120 */ - volatile u32 ebir; /* 0x00124 */ - volatile u32 etbr_h; /* 0x00128 */ - volatile u32 etbr_l; /* 0x0012c */ - volatile u32 etcir; /* 0x00130 */ - volatile u32 etpir; /* 0x00134 */ - volatile u32 emar_h; /* 0x00138 */ - volatile u32 emar_l; /* 0x0013c */ - volatile u32 ehar_h; /* 0x00140 */ - volatile u32 ehar_l; /* 0x00144 */ - volatile u32 micr; /* 0x00148 */ - volatile u32 midr_r; /* 0x0014c */ - volatile u32 midr_w; /* 0x00150 */ - volatile u32 pad1[(0x20000 - 0x00154) / 4]; - - /* SuperIO Registers XXX */ - struct ioc3_sioregs sregs; /* 0x20000 */ - volatile u32 pad2[(0x40000 - 0x20180) / 4]; - - /* SSRAM Diagnostic Access */ - volatile u32 ssram[(0x80000 - 0x40000) / 4]; - - /* Bytebus device offsets - 0x80000 - Access to the generic devices selected with DEV0 - 0x9FFFF bytebus DEV_SEL_0 - 0xA0000 - Access to the generic devices selected with DEV1 - 0xBFFFF bytebus DEV_SEL_1 - 0xC0000 - Access to the generic devices selected with DEV2 - 0xDFFFF bytebus DEV_SEL_2 - 0xE0000 - Access to the generic devices selected with DEV3 - 0xFFFFF bytebus DEV_SEL_3 */ -}; - -/* - * Ethernet RX Buffer - */ -struct ioc3_erxbuf { - u32 w0; /* first word (valid,bcnt,cksum) */ - u32 err; /* second word various errors */ - /* next comes n bytes of padding */ - /* then the received ethernet frame itself */ -}; - -#define ERXBUF_IPCKSUM_MASK 0x0000ffff -#define ERXBUF_BYTECNT_MASK 0x07ff0000 -#define ERXBUF_BYTECNT_SHIFT 16 -#define ERXBUF_V 0x80000000 - -#define ERXBUF_CRCERR 0x00000001 /* aka RSV15 */ -#define ERXBUF_FRAMERR 0x00000002 /* aka RSV14 */ -#define ERXBUF_CODERR 0x00000004 /* aka RSV13 */ -#define ERXBUF_INVPREAMB 0x00000008 /* aka RSV18 */ -#define ERXBUF_LOLEN 0x00007000 /* aka RSV2_0 */ -#define ERXBUF_HILEN 0x03ff0000 /* aka RSV12_3 */ -#define ERXBUF_MULTICAST 0x04000000 /* aka RSV16 */ -#define ERXBUF_BROADCAST 0x08000000 /* aka RSV17 */ -#define ERXBUF_LONGEVENT 0x10000000 /* aka RSV19 */ -#define ERXBUF_BADPKT 0x20000000 /* aka RSV20 */ -#define ERXBUF_GOODPKT 0x40000000 /* aka RSV21 */ -#define ERXBUF_CARRIER 0x80000000 /* aka RSV22 */ - -/* - * Ethernet TX Descriptor - */ -#define ETXD_DATALEN 104 -struct ioc3_etxd { - u32 cmd; /* command field */ - u32 bufcnt; /* buffer counts field */ - u64 p1; /* buffer pointer 1 */ - u64 p2; /* buffer pointer 2 */ - u8 data[ETXD_DATALEN]; /* opt. tx data */ -}; - -#define ETXD_BYTECNT_MASK 0x000007ff /* total byte count */ -#define ETXD_INTWHENDONE 0x00001000 /* intr when done */ -#define ETXD_D0V 0x00010000 /* data 0 valid */ -#define ETXD_B1V 0x00020000 /* buf 1 valid */ -#define ETXD_B2V 0x00040000 /* buf 2 valid */ -#define ETXD_DOCHECKSUM 0x00080000 /* insert ip cksum */ -#define ETXD_CHKOFF_MASK 0x07f00000 /* cksum byte offset */ -#define ETXD_CHKOFF_SHIFT 20 - -#define ETXD_D0CNT_MASK 0x0000007f -#define ETXD_B1CNT_MASK 0x0007ff00 -#define ETXD_B1CNT_SHIFT 8 -#define ETXD_B2CNT_MASK 0x7ff00000 -#define ETXD_B2CNT_SHIFT 20 - -/* - * Bytebus device space - */ -#define IOC3_BYTEBUS_DEV0 0x80000L -#define IOC3_BYTEBUS_DEV1 0xa0000L -#define IOC3_BYTEBUS_DEV2 0xc0000L -#define IOC3_BYTEBUS_DEV3 0xe0000L - -/* ------------------------------------------------------------------------- */ - -/* Superio Registers (PIO Access) */ -#define IOC3_SIO_BASE 0x20000 -#define IOC3_SIO_UARTC (IOC3_SIO_BASE+0x141) /* UART Config */ -#define IOC3_SIO_KBDCG (IOC3_SIO_BASE+0x142) /* KBD Config */ -#define IOC3_SIO_PP_BASE (IOC3_SIO_BASE+PP_BASE) /* Parallel Port */ -#define IOC3_SIO_RTC_BASE (IOC3_SIO_BASE+0x168) /* Real Time Clock */ -#define IOC3_SIO_UB_BASE (IOC3_SIO_BASE+UARTB_BASE) /* UART B */ -#define IOC3_SIO_UA_BASE (IOC3_SIO_BASE+UARTA_BASE) /* UART A */ - -/* SSRAM Diagnostic Access */ -#define IOC3_SSRAM IOC3_RAM_OFF /* base of SSRAM diagnostic access */ -#define IOC3_SSRAM_LEN 0x40000 /* 256kb (address space size, may not be fully populated) */ -#define IOC3_SSRAM_DM 0x0000ffff /* data mask */ -#define IOC3_SSRAM_PM 0x00010000 /* parity mask */ - -/* bitmasks for PCI_SCR */ -#define PCI_SCR_PAR_RESP_EN 0x00000040 /* enb PCI parity checking */ -#define PCI_SCR_SERR_EN 0x00000100 /* enable the SERR# driver */ -#define PCI_SCR_DROP_MODE_EN 0x00008000 /* drop pios on parity err */ -#define PCI_SCR_RX_SERR (0x1 << 16) -#define PCI_SCR_DROP_MODE (0x1 << 17) -#define PCI_SCR_SIG_PAR_ERR (0x1 << 24) -#define PCI_SCR_SIG_TAR_ABRT (0x1 << 27) -#define PCI_SCR_RX_TAR_ABRT (0x1 << 28) -#define PCI_SCR_SIG_MST_ABRT (0x1 << 29) -#define PCI_SCR_SIG_SERR (0x1 << 30) -#define PCI_SCR_PAR_ERR (0x1 << 31) - -/* bitmasks for IOC3_KM_CSR */ -#define KM_CSR_K_WRT_PEND 0x00000001 /* kbd port xmitting or resetting */ -#define KM_CSR_M_WRT_PEND 0x00000002 /* mouse port xmitting or resetting */ -#define KM_CSR_K_LCB 0x00000004 /* Line Cntrl Bit for last KBD write */ -#define KM_CSR_M_LCB 0x00000008 /* same for mouse */ -#define KM_CSR_K_DATA 0x00000010 /* state of kbd data line */ -#define KM_CSR_K_CLK 0x00000020 /* state of kbd clock line */ -#define KM_CSR_K_PULL_DATA 0x00000040 /* pull kbd data line low */ -#define KM_CSR_K_PULL_CLK 0x00000080 /* pull kbd clock line low */ -#define KM_CSR_M_DATA 0x00000100 /* state of ms data line */ -#define KM_CSR_M_CLK 0x00000200 /* state of ms clock line */ -#define KM_CSR_M_PULL_DATA 0x00000400 /* pull ms data line low */ -#define KM_CSR_M_PULL_CLK 0x00000800 /* pull ms clock line low */ -#define KM_CSR_EMM_MODE 0x00001000 /* emulation mode */ -#define KM_CSR_SIM_MODE 0x00002000 /* clock X8 */ -#define KM_CSR_K_SM_IDLE 0x00004000 /* Keyboard is idle */ -#define KM_CSR_M_SM_IDLE 0x00008000 /* Mouse is idle */ -#define KM_CSR_K_TO 0x00010000 /* Keyboard trying to send/receive */ -#define KM_CSR_M_TO 0x00020000 /* Mouse trying to send/receive */ -#define KM_CSR_K_TO_EN 0x00040000 /* KM_CSR_K_TO + KM_CSR_K_TO_EN = cause - SIO_IR to assert */ -#define KM_CSR_M_TO_EN 0x00080000 /* KM_CSR_M_TO + KM_CSR_M_TO_EN = cause - SIO_IR to assert */ -#define KM_CSR_K_CLAMP_ONE 0x00100000 /* Pull K_CLK low after rec. one char */ -#define KM_CSR_M_CLAMP_ONE 0x00200000 /* Pull M_CLK low after rec. one char */ -#define KM_CSR_K_CLAMP_THREE 0x00400000 /* Pull K_CLK low after rec. three chars */ -#define KM_CSR_M_CLAMP_THREE 0x00800000 /* Pull M_CLK low after rec. three char */ - -/* bitmasks for IOC3_K_RD and IOC3_M_RD */ -#define KM_RD_DATA_2 0x000000ff /* 3rd char recvd since last read */ -#define KM_RD_DATA_2_SHIFT 0 -#define KM_RD_DATA_1 0x0000ff00 /* 2nd char recvd since last read */ -#define KM_RD_DATA_1_SHIFT 8 -#define KM_RD_DATA_0 0x00ff0000 /* 1st char recvd since last read */ -#define KM_RD_DATA_0_SHIFT 16 -#define KM_RD_FRAME_ERR_2 0x01000000 /* framing or parity error in byte 2 */ -#define KM_RD_FRAME_ERR_1 0x02000000 /* same for byte 1 */ -#define KM_RD_FRAME_ERR_0 0x04000000 /* same for byte 0 */ - -#define KM_RD_KBD_MSE 0x08000000 /* 0 if from kbd, 1 if from mouse */ -#define KM_RD_OFLO 0x10000000 /* 4th char recvd before this read */ -#define KM_RD_VALID_2 0x20000000 /* DATA_2 valid */ -#define KM_RD_VALID_1 0x40000000 /* DATA_1 valid */ -#define KM_RD_VALID_0 0x80000000 /* DATA_0 valid */ -#define KM_RD_VALID_ALL (KM_RD_VALID_0|KM_RD_VALID_1|KM_RD_VALID_2) - -/* bitmasks for IOC3_K_WD & IOC3_M_WD */ -#define KM_WD_WRT_DATA 0x000000ff /* write to keyboard/mouse port */ -#define KM_WD_WRT_DATA_SHIFT 0 - -/* bitmasks for serial RX status byte */ -#define RXSB_OVERRUN 0x01 /* char(s) lost */ -#define RXSB_PAR_ERR 0x02 /* parity error */ -#define RXSB_FRAME_ERR 0x04 /* framing error */ -#define RXSB_BREAK 0x08 /* break character */ -#define RXSB_CTS 0x10 /* state of CTS */ -#define RXSB_DCD 0x20 /* state of DCD */ -#define RXSB_MODEM_VALID 0x40 /* DCD, CTS and OVERRUN are valid */ -#define RXSB_DATA_VALID 0x80 /* data byte, FRAME_ERR PAR_ERR & BREAK valid */ - -/* bitmasks for serial TX control byte */ -#define TXCB_INT_WHEN_DONE 0x20 /* interrupt after this byte is sent */ -#define TXCB_INVALID 0x00 /* byte is invalid */ -#define TXCB_VALID 0x40 /* byte is valid */ -#define TXCB_MCR 0x80 /* data<7:0> to modem control register */ -#define TXCB_DELAY 0xc0 /* delay data<7:0> mSec */ - -/* bitmasks for IOC3_SBBR_L */ -#define SBBR_L_SIZE 0x00000001 /* 0 == 1KB rings, 1 == 4KB rings */ -#define SBBR_L_BASE 0xfffff000 /* lower serial ring base addr */ - -/* bitmasks for IOC3_SSCR_ */ -#define SSCR_RX_THRESHOLD 0x000001ff /* hiwater mark */ -#define SSCR_TX_TIMER_BUSY 0x00010000 /* TX timer in progress */ -#define SSCR_HFC_EN 0x00020000 /* hardware flow control enabled */ -#define SSCR_RX_RING_DCD 0x00040000 /* post RX record on delta-DCD */ -#define SSCR_RX_RING_CTS 0x00080000 /* post RX record on delta-CTS */ -#define SSCR_HIGH_SPD 0x00100000 /* 4X speed */ -#define SSCR_DIAG 0x00200000 /* bypass clock divider for sim */ -#define SSCR_RX_DRAIN 0x08000000 /* drain RX buffer to memory */ -#define SSCR_DMA_EN 0x10000000 /* enable ring buffer DMA */ -#define SSCR_DMA_PAUSE 0x20000000 /* pause DMA */ -#define SSCR_PAUSE_STATE 0x40000000 /* sets when PAUSE takes effect */ -#define SSCR_RESET 0x80000000 /* reset DMA channels */ - -/* all producer/comsumer pointers are the same bitfield */ -#define PROD_CONS_PTR_4K 0x00000ff8 /* for 4K buffers */ -#define PROD_CONS_PTR_1K 0x000003f8 /* for 1K buffers */ -#define PROD_CONS_PTR_OFF 3 - -/* bitmasks for IOC3_SRCIR_ */ -#define SRCIR_ARM 0x80000000 /* arm RX timer */ - -/* bitmasks for IOC3_SRPIR_ */ -#define SRPIR_BYTE_CNT 0x07000000 /* bytes in packer */ -#define SRPIR_BYTE_CNT_SHIFT 24 - -/* bitmasks for IOC3_STCIR_ */ -#define STCIR_BYTE_CNT 0x0f000000 /* bytes in unpacker */ -#define STCIR_BYTE_CNT_SHIFT 24 - -/* bitmasks for IOC3_SHADOW_ */ -#define SHADOW_DR 0x00000001 /* data ready */ -#define SHADOW_OE 0x00000002 /* overrun error */ -#define SHADOW_PE 0x00000004 /* parity error */ -#define SHADOW_FE 0x00000008 /* framing error */ -#define SHADOW_BI 0x00000010 /* break interrupt */ -#define SHADOW_THRE 0x00000020 /* transmit holding register empty */ -#define SHADOW_TEMT 0x00000040 /* transmit shift register empty */ -#define SHADOW_RFCE 0x00000080 /* char in RX fifo has an error */ -#define SHADOW_DCTS 0x00010000 /* delta clear to send */ -#define SHADOW_DDCD 0x00080000 /* delta data carrier detect */ -#define SHADOW_CTS 0x00100000 /* clear to send */ -#define SHADOW_DCD 0x00800000 /* data carrier detect */ -#define SHADOW_DTR 0x01000000 /* data terminal ready */ -#define SHADOW_RTS 0x02000000 /* request to send */ -#define SHADOW_OUT1 0x04000000 /* 16550 OUT1 bit */ -#define SHADOW_OUT2 0x08000000 /* 16550 OUT2 bit */ -#define SHADOW_LOOP 0x10000000 /* loopback enabled */ - -/* bitmasks for IOC3_SRTR_ */ -#define SRTR_CNT 0x00000fff /* reload value for RX timer */ -#define SRTR_CNT_VAL 0x0fff0000 /* current value of RX timer */ -#define SRTR_CNT_VAL_SHIFT 16 -#define SRTR_HZ 16000 /* SRTR clock frequency */ - -/* bitmasks for IOC3_SIO_IR, IOC3_SIO_IEC and IOC3_SIO_IES */ -#define SIO_IR_SA_TX_MT 0x00000001 /* Serial port A TX empty */ -#define SIO_IR_SA_RX_FULL 0x00000002 /* port A RX buf full */ -#define SIO_IR_SA_RX_HIGH 0x00000004 /* port A RX hiwat */ -#define SIO_IR_SA_RX_TIMER 0x00000008 /* port A RX timeout */ -#define SIO_IR_SA_DELTA_DCD 0x00000010 /* port A delta DCD */ -#define SIO_IR_SA_DELTA_CTS 0x00000020 /* port A delta CTS */ -#define SIO_IR_SA_INT 0x00000040 /* port A pass-thru intr */ -#define SIO_IR_SA_TX_EXPLICIT 0x00000080 /* port A explicit TX thru */ -#define SIO_IR_SA_MEMERR 0x00000100 /* port A PCI error */ -#define SIO_IR_SB_TX_MT 0x00000200 /* */ -#define SIO_IR_SB_RX_FULL 0x00000400 /* */ -#define SIO_IR_SB_RX_HIGH 0x00000800 /* */ -#define SIO_IR_SB_RX_TIMER 0x00001000 /* */ -#define SIO_IR_SB_DELTA_DCD 0x00002000 /* */ -#define SIO_IR_SB_DELTA_CTS 0x00004000 /* */ -#define SIO_IR_SB_INT 0x00008000 /* */ -#define SIO_IR_SB_TX_EXPLICIT 0x00010000 /* */ -#define SIO_IR_SB_MEMERR 0x00020000 /* */ -#define SIO_IR_PP_INT 0x00040000 /* P port pass-thru intr */ -#define SIO_IR_PP_INTA 0x00080000 /* PP context A thru */ -#define SIO_IR_PP_INTB 0x00100000 /* PP context B thru */ -#define SIO_IR_PP_MEMERR 0x00200000 /* PP PCI error */ -#define SIO_IR_KBD_INT 0x00400000 /* kbd/mouse intr */ -#define SIO_IR_RT_INT 0x08000000 /* RT output pulse */ -#define SIO_IR_GEN_INT1 0x10000000 /* RT input pulse */ -#define SIO_IR_GEN_INT_SHIFT 28 - -/* per device interrupt masks */ -#define SIO_IR_SA (SIO_IR_SA_TX_MT | SIO_IR_SA_RX_FULL | \ - SIO_IR_SA_RX_HIGH | SIO_IR_SA_RX_TIMER | \ - SIO_IR_SA_DELTA_DCD | SIO_IR_SA_DELTA_CTS | \ - SIO_IR_SA_INT | SIO_IR_SA_TX_EXPLICIT | \ - SIO_IR_SA_MEMERR) -#define SIO_IR_SB (SIO_IR_SB_TX_MT | SIO_IR_SB_RX_FULL | \ - SIO_IR_SB_RX_HIGH | SIO_IR_SB_RX_TIMER | \ - SIO_IR_SB_DELTA_DCD | SIO_IR_SB_DELTA_CTS | \ - SIO_IR_SB_INT | SIO_IR_SB_TX_EXPLICIT | \ - SIO_IR_SB_MEMERR) -#define SIO_IR_PP (SIO_IR_PP_INT | SIO_IR_PP_INTA | \ - SIO_IR_PP_INTB | SIO_IR_PP_MEMERR) -#define SIO_IR_RT (SIO_IR_RT_INT | SIO_IR_GEN_INT1) - -/* macro to load pending interrupts */ -#define IOC3_PENDING_INTRS(mem) (PCI_INW(&((mem)->sio_ir)) & \ - PCI_INW(&((mem)->sio_ies_ro))) - -/* bitmasks for SIO_CR */ -#define SIO_CR_SIO_RESET 0x00000001 /* reset the SIO */ -#define SIO_CR_SER_A_BASE 0x000000fe /* DMA poll addr port A */ -#define SIO_CR_SER_A_BASE_SHIFT 1 -#define SIO_CR_SER_B_BASE 0x00007f00 /* DMA poll addr port B */ -#define SIO_CR_SER_B_BASE_SHIFT 8 -#define SIO_SR_CMD_PULSE 0x00078000 /* byte bus strobe length */ -#define SIO_CR_CMD_PULSE_SHIFT 15 -#define SIO_CR_ARB_DIAG 0x00380000 /* cur !enet PCI requet (ro) */ -#define SIO_CR_ARB_DIAG_TXA 0x00000000 -#define SIO_CR_ARB_DIAG_RXA 0x00080000 -#define SIO_CR_ARB_DIAG_TXB 0x00100000 -#define SIO_CR_ARB_DIAG_RXB 0x00180000 -#define SIO_CR_ARB_DIAG_PP 0x00200000 -#define SIO_CR_ARB_DIAG_IDLE 0x00400000 /* 0 -> active request (ro) */ - -/* bitmasks for INT_OUT */ -#define INT_OUT_COUNT 0x0000ffff /* pulse interval timer */ -#define INT_OUT_MODE 0x00070000 /* mode mask */ -#define INT_OUT_MODE_0 0x00000000 /* set output to 0 */ -#define INT_OUT_MODE_1 0x00040000 /* set output to 1 */ -#define INT_OUT_MODE_1PULSE 0x00050000 /* send 1 pulse */ -#define INT_OUT_MODE_PULSES 0x00060000 /* send 1 pulse every interval */ -#define INT_OUT_MODE_SQW 0x00070000 /* toggle output every interval */ -#define INT_OUT_DIAG 0x40000000 /* diag mode */ -#define INT_OUT_INT_OUT 0x80000000 /* current state of INT_OUT */ - -/* time constants for INT_OUT */ -#define INT_OUT_NS_PER_TICK (30 * 260) /* 30 ns PCI clock, divisor=260 */ -#define INT_OUT_TICKS_PER_PULSE 3 /* outgoing pulse lasts 3 ticks */ -#define INT_OUT_US_TO_COUNT(x) /* convert uS to a count value */ \ - (((x) * 10 + INT_OUT_NS_PER_TICK / 200) * \ - 100 / INT_OUT_NS_PER_TICK - 1) -#define INT_OUT_COUNT_TO_US(x) /* convert count value to uS */ \ - (((x) + 1) * INT_OUT_NS_PER_TICK / 1000) -#define INT_OUT_MIN_TICKS 3 /* min period is width of pulse in "ticks" */ -#define INT_OUT_MAX_TICKS INT_OUT_COUNT /* largest possible count */ - -/* bitmasks for GPCR */ -#define GPCR_DIR 0x000000ff /* tristate pin input or output */ -#define GPCR_DIR_PIN(x) (1<<(x)) /* access one of the DIR bits */ -#define GPCR_EDGE 0x000f0000 /* extint edge or level sensitive */ -#define GPCR_EDGE_PIN(x) (1<<((x)+15)) /* access one of the EDGE bits */ - -/* values for GPCR */ -#define GPCR_INT_OUT_EN 0x00100000 /* enable INT_OUT to pin 0 */ -#define GPCR_MLAN_EN 0x00200000 /* enable MCR to pin 8 */ -#define GPCR_DIR_SERA_XCVR 0x00000080 /* Port A Transceiver select enable */ -#define GPCR_DIR_SERB_XCVR 0x00000040 /* Port B Transceiver select enable */ -#define GPCR_DIR_PHY_RST 0x00000020 /* ethernet PHY reset enable */ - -/* defs for some of the generic I/O pins */ -#define GPCR_PHY_RESET 0x20 /* pin is output to PHY reset */ -#define GPCR_UARTB_MODESEL 0x40 /* pin is output to port B mode sel */ -#define GPCR_UARTA_MODESEL 0x80 /* pin is output to port A mode sel */ - -#define GPPR_PHY_RESET_PIN 5 /* GIO pin controlling phy reset */ -#define GPPR_UARTB_MODESEL_PIN 6 /* GIO pin controlling uart b mode select */ -#define GPPR_UARTA_MODESEL_PIN 7 /* GIO pin controlling uart a mode select */ - -#define EMCR_DUPLEX 0x00000001 -#define EMCR_PROMISC 0x00000002 -#define EMCR_PADEN 0x00000004 -#define EMCR_RXOFF_MASK 0x000001f8 -#define EMCR_RXOFF_SHIFT 3 -#define EMCR_RAMPAR 0x00000200 -#define EMCR_BADPAR 0x00000800 -#define EMCR_BUFSIZ 0x00001000 -#define EMCR_TXDMAEN 0x00002000 -#define EMCR_TXEN 0x00004000 -#define EMCR_RXDMAEN 0x00008000 -#define EMCR_RXEN 0x00010000 -#define EMCR_LOOPBACK 0x00020000 -#define EMCR_ARB_DIAG 0x001c0000 -#define EMCR_ARB_DIAG_IDLE 0x00200000 -#define EMCR_RST 0x80000000 - -#define EISR_RXTIMERINT 0x00000001 -#define EISR_RXTHRESHINT 0x00000002 -#define EISR_RXOFLO 0x00000004 -#define EISR_RXBUFOFLO 0x00000008 -#define EISR_RXMEMERR 0x00000010 -#define EISR_RXPARERR 0x00000020 -#define EISR_TXEMPTY 0x00010000 -#define EISR_TXRTRY 0x00020000 -#define EISR_TXEXDEF 0x00040000 -#define EISR_TXLCOL 0x00080000 -#define EISR_TXGIANT 0x00100000 -#define EISR_TXBUFUFLO 0x00200000 -#define EISR_TXEXPLICIT 0x00400000 -#define EISR_TXCOLLWRAP 0x00800000 -#define EISR_TXDEFERWRAP 0x01000000 -#define EISR_TXMEMERR 0x02000000 -#define EISR_TXPARERR 0x04000000 - -#define ERCSR_THRESH_MASK 0x000001ff /* enet RX threshold */ -#define ERCSR_RX_TMR 0x40000000 /* simulation only */ -#define ERCSR_DIAG_OFLO 0x80000000 /* simulation only */ - -#define ERBR_ALIGNMENT 4096 -#define ERBR_L_RXRINGBASE_MASK 0xfffff000 - -#define ERBAR_BARRIER_BIT 0x0100 -#define ERBAR_RXBARR_MASK 0xffff0000 -#define ERBAR_RXBARR_SHIFT 16 - -#define ERCIR_RXCONSUME_MASK 0x00000fff - -#define ERPIR_RXPRODUCE_MASK 0x00000fff -#define ERPIR_ARM 0x80000000 - -#define ERTR_CNT_MASK 0x000007ff - -#define ETCSR_IPGT_MASK 0x0000007f -#define ETCSR_IPGR1_MASK 0x00007f00 -#define ETCSR_IPGR1_SHIFT 8 -#define ETCSR_IPGR2_MASK 0x007f0000 -#define ETCSR_IPGR2_SHIFT 16 -#define ETCSR_NOTXCLK 0x80000000 - -#define ETCDC_COLLCNT_MASK 0x0000ffff -#define ETCDC_DEFERCNT_MASK 0xffff0000 -#define ETCDC_DEFERCNT_SHIFT 16 - -#define ETBR_ALIGNMENT (64*1024) -#define ETBR_L_RINGSZ_MASK 0x00000001 -#define ETBR_L_RINGSZ128 0 -#define ETBR_L_RINGSZ512 1 -#define ETBR_L_TXRINGBASE_MASK 0xffffc000 - -#define ETCIR_TXCONSUME_MASK 0x0000ffff -#define ETCIR_IDLE 0x80000000 - -#define ETPIR_TXPRODUCE_MASK 0x0000ffff - -#define EBIR_TXBUFPROD_MASK 0x0000001f -#define EBIR_TXBUFCONS_MASK 0x00001f00 -#define EBIR_TXBUFCONS_SHIFT 8 -#define EBIR_RXBUFPROD_MASK 0x007fc000 -#define EBIR_RXBUFPROD_SHIFT 14 -#define EBIR_RXBUFCONS_MASK 0xff800000 -#define EBIR_RXBUFCONS_SHIFT 23 - -#define MICR_REGADDR_MASK 0x0000001f -#define MICR_PHYADDR_MASK 0x000003e0 -#define MICR_PHYADDR_SHIFT 5 -#define MICR_READTRIG 0x00000400 -#define MICR_BUSY 0x00000800 - -#define MIDR_DATA_MASK 0x0000ffff - -#define ERXBUF_IPCKSUM_MASK 0x0000ffff -#define ERXBUF_BYTECNT_MASK 0x07ff0000 -#define ERXBUF_BYTECNT_SHIFT 16 -#define ERXBUF_V 0x80000000 - -#define ERXBUF_CRCERR 0x00000001 /* aka RSV15 */ -#define ERXBUF_FRAMERR 0x00000002 /* aka RSV14 */ -#define ERXBUF_CODERR 0x00000004 /* aka RSV13 */ -#define ERXBUF_INVPREAMB 0x00000008 /* aka RSV18 */ -#define ERXBUF_LOLEN 0x00007000 /* aka RSV2_0 */ -#define ERXBUF_HILEN 0x03ff0000 /* aka RSV12_3 */ -#define ERXBUF_MULTICAST 0x04000000 /* aka RSV16 */ -#define ERXBUF_BROADCAST 0x08000000 /* aka RSV17 */ -#define ERXBUF_LONGEVENT 0x10000000 /* aka RSV19 */ -#define ERXBUF_BADPKT 0x20000000 /* aka RSV20 */ -#define ERXBUF_GOODPKT 0x40000000 /* aka RSV21 */ -#define ERXBUF_CARRIER 0x80000000 /* aka RSV22 */ - -#define ETXD_BYTECNT_MASK 0x000007ff /* total byte count */ -#define ETXD_INTWHENDONE 0x00001000 /* intr when done */ -#define ETXD_D0V 0x00010000 /* data 0 valid */ -#define ETXD_B1V 0x00020000 /* buf 1 valid */ -#define ETXD_B2V 0x00040000 /* buf 2 valid */ -#define ETXD_DOCHECKSUM 0x00080000 /* insert ip cksum */ -#define ETXD_CHKOFF_MASK 0x07f00000 /* cksum byte offset */ -#define ETXD_CHKOFF_SHIFT 20 - -#define ETXD_D0CNT_MASK 0x0000007f -#define ETXD_B1CNT_MASK 0x0007ff00 -#define ETXD_B1CNT_SHIFT 8 -#define ETXD_B2CNT_MASK 0x7ff00000 -#define ETXD_B2CNT_SHIFT 20 - -typedef enum ioc3_subdevs_e { - ioc3_subdev_ether, - ioc3_subdev_generic, - ioc3_subdev_nic, - ioc3_subdev_kbms, - ioc3_subdev_ttya, - ioc3_subdev_ttyb, - ioc3_subdev_ecpp, - ioc3_subdev_rt, - ioc3_nsubdevs -} ioc3_subdev_t; - -/* subdevice disable bits, - * from the standard INFO_LBL_SUBDEVS - */ -#define IOC3_SDB_ETHER (1< -#include - -#define RTC_BASE_ADDR (unsigned char *)(nvram_base) - -/* Defines for the SGS-Thomson M48T35 clock */ -#define RTC_SGS_WRITE_ENABLE 0x80 -#define RTC_SGS_READ_PROTECT 0x40 -#define RTC_SGS_YEAR_ADDR (RTC_BASE_ADDR + 0x7fffL) -#define RTC_SGS_MONTH_ADDR (RTC_BASE_ADDR + 0x7ffeL) -#define RTC_SGS_DATE_ADDR (RTC_BASE_ADDR + 0x7ffdL) -#define RTC_SGS_DAY_ADDR (RTC_BASE_ADDR + 0x7ffcL) -#define RTC_SGS_HOUR_ADDR (RTC_BASE_ADDR + 0x7ffbL) -#define RTC_SGS_MIN_ADDR (RTC_BASE_ADDR + 0x7ffaL) -#define RTC_SGS_SEC_ADDR (RTC_BASE_ADDR + 0x7ff9L) -#define RTC_SGS_CONTROL_ADDR (RTC_BASE_ADDR + 0x7ff8L) - -/* Defines for the Dallas DS1386 */ -#define RTC_DAL_UPDATE_ENABLE 0x80 -#define RTC_DAL_UPDATE_DISABLE 0x00 -#define RTC_DAL_YEAR_ADDR (RTC_BASE_ADDR + 0xaL) -#define RTC_DAL_MONTH_ADDR (RTC_BASE_ADDR + 0x9L) -#define RTC_DAL_DATE_ADDR (RTC_BASE_ADDR + 0x8L) -#define RTC_DAL_DAY_ADDR (RTC_BASE_ADDR + 0x6L) -#define RTC_DAL_HOUR_ADDR (RTC_BASE_ADDR + 0x4L) -#define RTC_DAL_MIN_ADDR (RTC_BASE_ADDR + 0x2L) -#define RTC_DAL_SEC_ADDR (RTC_BASE_ADDR + 0x1L) -#define RTC_DAL_CONTROL_ADDR (RTC_BASE_ADDR + 0xbL) -#define RTC_DAL_USER_ADDR (RTC_BASE_ADDR + 0xeL) - -/* Defines for the Dallas DS1742 */ -#define RTC_DS1742_WRITE_ENABLE 0x80 -#define RTC_DS1742_READ_ENABLE 0x40 -#define RTC_DS1742_UPDATE_DISABLE 0x00 -#define RTC_DS1742_YEAR_ADDR (RTC_BASE_ADDR + 0x7ffL) -#define RTC_DS1742_MONTH_ADDR (RTC_BASE_ADDR + 0x7feL) -#define RTC_DS1742_DATE_ADDR (RTC_BASE_ADDR + 0x7fdL) -#define RTC_DS1742_DAY_ADDR (RTC_BASE_ADDR + 0x7fcL) -#define RTC_DS1742_HOUR_ADDR (RTC_BASE_ADDR + 0x7fbL) -#define RTC_DS1742_MIN_ADDR (RTC_BASE_ADDR + 0x7faL) -#define RTC_DS1742_SEC_ADDR (RTC_BASE_ADDR + 0x7f9L) -#define RTC_DS1742_CONTROL_ADDR (RTC_BASE_ADDR + 0x7f8L) -#define RTC_DS1742_USER_ADDR (RTC_BASE_ADDR + 0x0L) - -#define BCD_TO_INT(x) (((x>>4) * 10) + (x & 0xf)) -#define INT_TO_BCD(x) (((x / 10)<<4) + (x % 10)) - -#define YRREF 1970 - -#endif /* _ASM_IA64_SN_KLCLOCK_H */